import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import 'element-plus/dist/index.css'
import "quill/dist/quill.core.css";
import "quill/dist/quill.snow.css";
import "quill/dist/quill.bubble.css";
import router from './router/index';
import store from './store'
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
// 引入全局组件
import globalComponents from './components/globalComponents';

const app = createApp(App)

for (const [key, component] of Object.entries(globalComponents)) {
	app.component(key, component)
}
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
	app.component(key, component)
}


// store.dispatch('route/initializeRouteList')
app.use(ElementPlus, {
	locale: zhCn,
})
app.use(store)
app.use(router);
app.use(ElementPlus)
app.mount('#app')